﻿using Super.Admin.Entities;

namespace Super.Admin.IServices
{
    /// <summary>
    /// 用户操作日志服务接口类
    /// </summary>
    public interface IUserOperateLogService : IBaseService
    {
        /// <summary>
        /// 查询用户操作日志
        /// </summary>
        /// <param name="operateType">操作类型</param>
        /// <param name="operateUserId">操作人id</param>
        /// <returns>用户操作日志实体集合</returns>
        IReadOnlyCollection<UserOperateLogEntity> GetUserOperateLogs(int operateType, int operateUserId);
        /// <summary>
        /// 查询用户操作日志
        /// </summary>
        /// <param name="message">信息</param>
        /// <param name="operateUserId">操作人id</param>
        /// <param name="permissionKey">权限标识</param>
        /// <param name="operateType">操作类型</param>
        /// <param name="beginTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="pageSize">一页数量</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="totalCount">总数</param>
        /// <returns>用户操作日志实体集合</returns>
        IReadOnlyCollection<UserOperateLogEntity> GetUserOperateLogs(string message, int operateUserId, string permissionKey, int operateType, string beginTime, string endTime, int pageSize, int pageIndex, out int totalCount);
        /// <summary>
        /// 创建用户操作日志
        /// </summary>
        /// <param name="operateUserId">操作人id</param>
        /// <param name="message">信息</param>
        /// <param name="permissionKey">权限标识</param>
        /// <param name="operateType">操作类型</param>
        void CreateUserOperateLog(int operateUserId, string message, string permissionKey, int operateType = 1);
    }
}
